import { Http } from "../http/http"

class OrgModel {
  // 风采列表
  static async beautyList(){
    return await Http.request({
        url: `system/beauty/appList?shelfStatus=1`,
        method:'GET',
    })
  }
  // 心愿活动列表
  static async list(type, activityType){
    if(type == 1){
      return await Http.request({
          url: `system/wish/list?shelfStatus=1&type=1`,
          method:'GET',
      })
    }else {
      return await Http.request({
        url: `system/wish/list?shelfStatus=1&type=2&activityType=${activityType}`,
        method:'GET',
    })
    }
    
  }


  // 心愿详情
  static async wishDetail(id){
    return await Http.request({
        url: `system/wish/app/${id}`,
        method:'GET',
    })
  }

  // 认领心愿
  static async applyWish(data){
    return await Http.request({
        url: `system/wish/applyWish`,
        method:'POST',
        data:data
    })
  }
  // 用户 心愿列表
  static async wishList(bool){
    return await Http.request({
        url: `system/wishlist/user/${bool}`,
        method:'GET'
    })
  }



  // 报名 党建活动
  static async applyParty(data){
    return await Http.request({
        url: `system/wish/applyPartyActivity`,
        method:'POST',
        data:data
    })
  }

  
}

export {
  OrgModel
}